<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<%
	String hid = request.getParameter("hisid");
%>
<!DOCTYPE html>
<!-- html -->
<html>
<!-- head -->
<head>
    <title>问题反馈</title>
    <link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all"/><!-- bootstrap-CSS -->
    <link href="css/font-awesome.css" rel="stylesheet" type="text/css" media="all"/><!-- Fontawesome-CSS -->
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script type='text/javascript' src='js/jquery-2.2.3.min.js'></script>
    <!-- Custom Theme files -->
    <!--theme-style-->
    <link href="css/style.css" rel="stylesheet" type="text/css" media="all"/>
    <!--//theme-style-->
    <!-- metatags -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="keywords" content="Online Recharge Responsive web template, Bootstrap Web Templates, Flat Web Templates, Android Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, Sony Ericsson, Motorola web design"/>

    <style>

        a {
            text-decoration: none;
        }
        #sds{
         position:fixed;
         margin-right;
         top: 300px;
         right: 0px;
        }
    </style>
  
</head>
<!-- /head -->
<!-- body -->
<body>
  	<div  id="sds"    >

            <h3>客服</h3>
            <!-- 被引用的页面-->
         
            <table>
            <tr>
            <td>
            <textarea rows="8" cols="25" id="wenben" >
             
            </textarea>
            	
            </td>
            </tr>
            
            <tr>
            <td>
           <input type="text" id="line" >	
            </td>
            </tr>
            	  
            <tr>
            <td>
          <input type="button" onclick="hui()" value="提交">
            	  </td>
            </tr>
            	</table>
         
         <!--    <iframe src="a.jsp" style="width: 300px;height: 200px;margin-right: -200px" frameborder="0"></iframe>
       -->  </div>
<header>
    <%@include file="Top.jsp" %>
</header>
<!-- innerbanner -->
<div class="agileits-inner-banner">

</div>
<!-- //innerbanner -->

<!-- breadcrumbs -->
<div class="w3layouts-breadcrumbs text-center">
    <div class="container">
        <span class="agile-breadcrumbs"><i class="fa fa-home home_1"></i> 问题反馈</span>
    </div>

</div>
<!-- //breadcrumbs -->
<!-- Buses-list -->
<div class="agile-bus-list w3layouts-content">
   
    <div class="container">
   
        <!--bus-single -->
        <h3 class="w3-head">问题反馈</h3>
        <p>请输入您的问题，我们将在三个工作日内回复您</p>
        <!-- bus-routes -->
        <div class="bus-tp">
            <div class="bus-tp-inner">
                <div class="clearfix">
                </div>
            </div>
        </div>
        <!-- /bus-routes -->
        <div class="w3agile bus-midd" style="float: left; "  >
            <span style="color: #31b0d5"></span>
            <div class="table-responsive">
               
                <!-- value是hisId 订单编号 -->
                	<input type="hidden" value="<%=hid %>" name="hisId" id="hisId">
                    <textarea name="question" rows="30" cols="100" id="question"></textarea><br>
                    <br /><br />
                    <input type="button" style="margin-left:680px" class="submit"value="提交问题" onclick="addQuestion()">
                    <input type="reset"  style="margin-left: 30px"  class="submit" value="清空内容">
              
            </div>


        </div>

    </div>
</div>
<div class="modal fade" id="myModalbook" role="dialog">
    <div class="modal-dialog">
        <!-- Modal content-->
        <div class="modal-content">
            <div class="modal-header">

                <button type="button" class="close" data-dismiss="modal">&times;</button>
            </div>
            <div class="modal-body">
                <h4 class="modal-title">
                    Select your seat now</h4>
                <div class="main-booking">
                    <div id="seat-map">
                        <div class="front-indicator"><h3>Front</h3></div>
                    </div>
                    <div class="booking-details">
                        <div id="legend"></div>
                        <h3> Selected Seats (<span id="counter">0</span>):</h3>
                        <ul id="selected-seats" class="scrollbar scrollbar1"></ul>

                        Total: <b>$<span id="total">0</span></b>

                        <a href="pay.html">
                            <button class="checkout-button">Pay Now</button>
                        </a>
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
    </div>
</div>
  <script type="text/javascript">
    
    	function hui(){
    		
    		var a = $("#line").val();
    		 
    		$.ajax({
    			type : "POST",
    			url : '<%=basePath%>romt/robot',
    			dataType : 'json',
    			data : {
    				"line" :a,
    		 	},
    			success:function(data) {
    				
    				alert(data.msg)
    				 $("#wenben").val(data.msg);
    			 	},
    			error:function(result) {
    				 
    				alert("异常！");
    			}

    		});
    	}
    		function addQuestion() {
    			alert("进入");
    			var hisId = $('#hisId').val();
    			var question = $("#question").val();
    		
    	
    			$.ajax({
    				type : "POST",
    				url : '<%=basePath%>Qusetion/addQuestion',
    				dataType :'json',
    				data : {
    					"hisId" : hisId,
    					"question" : question,
    				},
    				
    				success : function(result) {
    					 if(result.status==1){
    						
    						 alert("添加成功!")
    						 window.location.href="his/selone";
    					}else {
    						 alert("添加失败!")
    					}
    					
    				},
    				error : function(result) {
    					alert("异常！");
    				}

    			});
    		
    	}
    </script>
    
<script>
    var firstSeatLabel = 1;

    $(document).ready(function () {
        var $cart = $('#selected-seats'),
            $counter = $('#counter'),
            $total = $('#total'),
            sc = $('#seat-map').seatCharts({
                map: [
                    'ff_ff',
                    'ff_ff',
                    'ee_ee',
                    'ee_ee',
                    'ee___',
                    'ee_ee',
                    'ee_ee',
                    'ee_ee',
                    'eeeee',
                ],
                seats: {
                    f: {
                        price: 100,
                        classes: 'first-class', //your custom CSS class
                        category: 'First Class'
                    },
                    e: {
                        price: 40,
                        classes: 'economy-class', //your custom CSS class
                        category: 'Economy Class'
                    }

                },
                naming: {
                    top: false,
                    getLabel: function (character, row, column) {
                        return firstSeatLabel++;
                    },
                },
                legend: {
                    node: $('#legend'),
                    items: [
                        ['f', 'available', 'First Class'],
                        ['e', 'available', 'Economy Class'],
                        ['f', 'unavailable', 'Already Booked']
                    ]
                },
                click: function () {
                    if (this.status() == 'available') {
                        //let's create a new <li> which we'll add to the cart items
                        $('<li>' + this.data().category + ' : Seat no ' + this.settings.label + ': <b>$' + this.data().price + '</b> <a href="#" class="cancel-cart-item">[cancel]</a></li>')
                            .attr('id', 'cart-item-' + this.settings.id)
                            .data('seatId', this.settings.id)
                            .appendTo($cart);

                        /*
                         * Lets update the counter and total
                         *
                         * .find function will not find the current seat, because it will change its stauts only after return
                         * 'selected'. This is why we have to add 1 to the length and the current seat price to the total.
                         */
                        $counter.text(sc.find('selected').length + 1);
                        $total.text(recalculateTotal(sc) + this.data().price);

                        return 'selected';
                    } else if (this.status() == 'selected') {
                        //update the counter
                        $counter.text(sc.find('selected').length - 1);
                        //and total
                        $total.text(recalculateTotal(sc) - this.data().price);

                        //remove the item from our cart
                        $('#cart-item-' + this.settings.id).remove();

                        //seat has been vacated
                        return 'available';
                    } else if (this.status() == 'unavailable') {
                        //seat has been already booked
                        return 'unavailable';
                    } else {
                        return this.style();
                    }
                }
            });

        //this will handle "[cancel]" link clicks
        $('#selected-seats').on('click', '.cancel-cart-item', function () {
            //let's just trigger Click event on the appropriate seat, so we don't have to repeat the logic here
            sc.get($(this).parents('li:first').data('seatId')).click();
        });

        //let's pretend some seats have already been booked
        sc.get(['1_2', '4_1', '7_1', '7_2']).status('unavailable');

    });

    function recalculateTotal(sc) {
        var total = 0;

        //basically find every selected seat and sum its price
        sc.find('selected').each(function () {
            total += this.data().price;
        });

        return total;
    }
</script>


<!-- //for bootstrap working -->
<!-- Seat select -->
<script src="js/jquery.seat-charts.js"></script>
<link rel="stylesheet" type="text/css" href="css/jquery.seat-charts.css">
<!-- //Seat select -->
<!-- here stars scrolling icon -->
<div class="phone" id="mobileappagileits">
		<div class="container">
			<div class="col-md-6">
				<img src="images/ph1.png" class="img-responsive" alt=""/>
			</div>
			<div class="col-md-6 phone-text">
				<h4>校园充手机端上线了！</h4>
               
					<div class="text-1">
						<h5>Recharge</h5>
						<p>更加简单快捷的付款方式</p>
					</div>
					<div class="text-1"> </div>
			  <div class="agileinfo-dwld-app">
							<h6>Download The App : 
								<a href="#"><i class="fa fa-android"></i></a>
							</h6>
						</div>
			</div>
          <div class="clearfix"></div>
            <div class="wthree-mobile-app"> </div>
		</div>
	</div>

</body>
<!-- /body -->
</html>
<!-- /html -->